#ifndef EnumSettingPage_h
#define EnumSettingPage_h

#include <aknpopupsettingpage.h>

#include "Settings.h"

class CAknQueryValueText;
class CAknCheckBoxSettingPage;

class CEnumSettingPage: public CAknPopupSettingPage
{
public:
	enum TSettingPageType {EProfileListSettingPage, EAppListSettingPage};
	static CEnumSettingPage* NewL(const TDesC& aTitle, TInt& aIndex, TMyIntArray& aProfileList, TInt aArrResId, TInt aInd);
	static CEnumSettingPage* NewL(const TDesC& aTitle, TInt& aIndex, TInt& aStartHour, TInt& aStartMinute, TInt& aEndHour, TInt& aEndMinute, TInt aArrResId, TInt aInd);
	static CEnumSettingPage* NewL(const TDesC& aTitle, TInt& aRemindMeState, TTime& aSleepTime);
	static CEnumSettingPage* NewL(const TDesC& aTitle, TInt& aInd, TTimeIntervalSeconds& aPeriod);
	static CEnumSettingPage* NewL(const TDesC& aTitle, TInt& aInd);
	static CEnumSettingPage* CreateVolumeSettingPageL(const TDesC& aTitle, TInt& aIndex, TInt& aVolume);
	static CEnumSettingPage* NewL(const TDesC& aTitle, TInt& aIndex, RArray<TUid>& aAppList, TInt aArrResId, TInt aInd);
	~CEnumSettingPage();
	static void TargetLight(TInt aTarget, TDes& aText);
protected:
	static CAknQueryValueText* CreateArrayLC(TInt aResId, TInt aSelectedItem);

	void ConstructL(const TDesC& aTitle, CAknQueryValueText* aQueryValArr, TInt aInd);
	CEnumSettingPage(const TDesC& aTitle, TInt& aIndex, MAknQueryValue& aQueryValue);
	virtual TBool OkToExitL(TBool aAccept);
	TBool TryToShowExtraSettingPage();
	virtual void AcceptSettingL();
	CAknCheckBoxSettingPage* CreateAppListSettingPage(const TDesC& aTitle, TInt aInd);
public:
	TInt& iIndex;
//possible data
	TDes* iText;
	const TDesC& iTitle;
	TMyIntArray* iProfileList;
protected:
	TSettingPageType iSettingPageType;
	CAknQueryValueText* iQueryValArr;
	TTime* iSleepUntil;
	TInt* iStartHour;
	TInt* iStartMinute;
	TInt* iEndHour;
	TInt* iEndMinute;
	
	TInt* iRepeats;
	TInt* iVolume;

	TTimeIntervalSeconds* iPeriod;
	RArray<TInt> iLightInd;
	RArray<TUid>* iAppList;

private:
	TBool iDontSaveSettings;
	TBool iAlreadyShown;

};

#endif

